3.1.15 \(\int \frac {(a+b x^2)^2 (A+B x^2)}{x^2} \, dx\) [15]

Optimal. Leaf size=48 \[ -\frac {a^2 A}{x}+a (2 A b+a B) x+\frac {1}{3} b (A b+2 a B) x^3+\frac {1}{5} b^2 B x^5 \]

[Out]

-a^2*A/x+a*(2*A*b+B*a)*x+1/3*b*(A*b+2*B*a)*x^3+1/5*b^2*B*x^5

________________________________________________________________________________________

Rubi [A]
time = 0.02, antiderivative size = 48, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, integrand size = 20, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.050, Rules used = {459} \begin {gather*} -\frac {a^2 A}{x}+\frac {1}{3} b x^3 (2 a B+A b)+a x (a B+2 A b)+\frac {1}{5} b^2 B x^5 \end {gather*}

Antiderivative was successfully verified.

[In]

Int[((a + b*x^2)^2*(A + B*x^2))/x^2,x]

[Out]

-((a^2*A)/x) + a*(2*A*b + a*B)*x + (b*(A*b + 2*a*B)*x^3)/3 + (b^2*B*x^5)/5

Rule 459

Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_))^(q_.), x_Symbol] :> Int[ExpandI
ntegrand[(e*x)^m*(a + b*x^n)^p*(c + d*x^n)^q, x], x] /; FreeQ[{a, b, c, d, e, m, n}, x] && NeQ[b*c - a*d, 0] &
& IGtQ[p, 0] && IGtQ[q, 0]

Rubi steps

\begin {align*} \int \frac {\left (a+b x^2\right )^2 \left (A+B x^2\right )}{x^2} \, dx &=\int \left (a (2 A b+a B)+\frac {a^2 A}{x^2}+b (A b+2 a B) x^2+b^2 B x^4\right ) \, dx\\ &=-\frac {a^2 A}{x}+a (2 A b+a B) x+\frac {1}{3} b (A b+2 a B) x^3+\frac {1}{5} b^2 B x^5\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.01, size = 48, normalized size = 1.00 \begin {gather*} -\frac {a^2 A}{x}+a (2 A b+a B) x+\frac {1}{3} b (A b+2 a B) x^3+\frac {1}{5} b^2 B x^5 \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[((a + b*x^2)^2*(A + B*x^2))/x^2,x]

[Out]

-((a^2*A)/x) + a*(2*A*b + a*B)*x + (b*(A*b + 2*a*B)*x^3)/3 + (b^2*B*x^5)/5

________________________________________________________________________________________

Maple [A]
time = 0.06, size = 49, normalized size = 1.02

method result size
default \(\frac {b^{2} B \,x^{5}}{5}+\frac {A \,b^{2} x^{3}}{3}+\frac {2 B a b \,x^{3}}{3}+2 a b A x +a^{2} B x -\frac {a^{2} A}{x}\) \(49\)
risch \(\frac {b^{2} B \,x^{5}}{5}+\frac {A \,b^{2} x^{3}}{3}+\frac {2 B a b \,x^{3}}{3}+2 a b A x +a^{2} B x -\frac {a^{2} A}{x}\) \(49\)
norman \(\frac {\frac {b^{2} B \,x^{6}}{5}+\left (\frac {1}{3} b^{2} A +\frac {2}{3} a b B \right ) x^{4}+\left (2 a b A +a^{2} B \right ) x^{2}-a^{2} A}{x}\) \(52\)
gosper \(-\frac {-3 b^{2} B \,x^{6}-5 A \,b^{2} x^{4}-10 B a b \,x^{4}-30 a A b \,x^{2}-15 B \,a^{2} x^{2}+15 a^{2} A}{15 x}\) \(56\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((b*x^2+a)^2*(B*x^2+A)/x^2,x,method=_RETURNVERBOSE)

[Out]

1/5*b^2*B*x^5+1/3*A*b^2*x^3+2/3*B*a*b*x^3+2*a*b*A*x+a^2*B*x-a^2*A/x

________________________________________________________________________________________

Maxima [A]
time = 0.28, size = 48, normalized size = 1.00 \begin {gather*} \frac {1}{5} \, B b^{2} x^{5} + \frac {1}{3} \, {\left (2 \, B a b + A b^{2}\right )} x^{3} - \frac {A a^{2}}{x} + {\left (B a^{2} + 2 \, A a b\right )} x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x^2+a)^2*(B*x^2+A)/x^2,x, algorithm="maxima")

[Out]

1/5*B*b^2*x^5 + 1/3*(2*B*a*b + A*b^2)*x^3 - A*a^2/x + (B*a^2 + 2*A*a*b)*x

________________________________________________________________________________________

Fricas [A]
time = 0.83, size = 53, normalized size = 1.10 \begin {gather*} \frac {3 \, B b^{2} x^{6} + 5 \, {\left (2 \, B a b + A b^{2}\right )} x^{4} - 15 \, A a^{2} + 15 \, {\left (B a^{2} + 2 \, A a b\right )} x^{2}}{15 \, x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x^2+a)^2*(B*x^2+A)/x^2,x, algorithm="fricas")

[Out]

1/15*(3*B*b^2*x^6 + 5*(2*B*a*b + A*b^2)*x^4 - 15*A*a^2 + 15*(B*a^2 + 2*A*a*b)*x^2)/x

________________________________________________________________________________________

Sympy [A]
time = 0.04, size = 48, normalized size = 1.00 \begin {gather*} - \frac {A a^{2}}{x} + \frac {B b^{2} x^{5}}{5} + x^{3} \left (\frac {A b^{2}}{3} + \frac {2 B a b}{3}\right ) + x \left (2 A a b + B a^{2}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x**2+a)**2*(B*x**2+A)/x**2,x)

[Out]

-A*a**2/x + B*b**2*x**5/5 + x**3*(A*b**2/3 + 2*B*a*b/3) + x*(2*A*a*b + B*a**2)

________________________________________________________________________________________

Giac [A]
time = 1.32, size = 48, normalized size = 1.00 \begin {gather*} \frac {1}{5} \, B b^{2} x^{5} + \frac {2}{3} \, B a b x^{3} + \frac {1}{3} \, A b^{2} x^{3} + B a^{2} x + 2 \, A a b x - \frac {A a^{2}}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x^2+a)^2*(B*x^2+A)/x^2,x, algorithm="giac")

[Out]

1/5*B*b^2*x^5 + 2/3*B*a*b*x^3 + 1/3*A*b^2*x^3 + B*a^2*x + 2*A*a*b*x - A*a^2/x

________________________________________________________________________________________

Mupad [B]
time = 0.03, size = 48, normalized size = 1.00 \begin {gather*} x^3\,\left (\frac {A\,b^2}{3}+\frac {2\,B\,a\,b}{3}\right )+x\,\left (B\,a^2+2\,A\,b\,a\right )-\frac {A\,a^2}{x}+\frac {B\,b^2\,x^5}{5} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((A + B*x^2)*(a + b*x^2)^2)/x^2,x)

[Out]

x^3*((A*b^2)/3 + (2*B*a*b)/3) + x*(B*a^2 + 2*A*a*b) - (A*a^2)/x + (B*b^2*x^5)/5

________________________________________________________________________________________